Particular embodiments generally relate to transcoding, and more particularly to determining if a discrete cosine transform (DCT) operation in a transcoding process can be bypassed.
Transcoding is a digital-to-digital conversion from one format of video sequence to another format of video sequence. For example, transcoding may be performed from a motion picture experts group (MPEG)-2 bit stream to an advanced video coding (AVC) bit stream. Transcoding typically involves decoding/decompressing the MPEG-2 bit stream and then re-encoding it, using an AVC encoder, into an AVC bit stream.
The MPEG-2 bit stream contains an 8×8 DCT block of coefficients. However, the encoding loop of the AVC requires that a 4×4 DCT block of coefficients be computed. Thus, from the MPEG-2 bit stream, DCT coefficients for an 8×8 block are found, but DCT coefficients for a 4×4 block are needed.
The 8×8 block already has a motion vector computed in the MPEG-2 bit stream. However, the motion vector for the 8×8 block cannot be used for a 4×4 block in AVC. To compute the motion vector for the 4×4 block, an inverse DCT (IDCT) must be performed for the 8×8 block. Then, a sum of absolute difference (SAD) may be computed from the IDCT for the 4×4 block. Computing the IDCT is a computationally expensive step, but the SAD is needed to determine the motion vector for the 4×4 DCT.